<form id="pagerForm" method="post" action="<?php echo SITE_URL . 'index.php?c='.$controller;?>">
    <input type="hidden" name="pageNum" value="1" />
    <input type="hidden" name="numPerPage" value="<?php echo $list['pager']->per_page;?>" />
    <input type="hidden" name="cate_name" value="<?php echo $_input->post('cate_name');?>" />
    <input type="hidden" name="action_url" value="<?php echo $_input->post('action_url');?>" />
</form>


<div class="pageHeader">
    <form onsubmit="return navTabSearch(this);" action="<?php echo SITE_URL . 'index.php?c='.$controller;?>" method="post">
        <div class="searchBar">
            <table class="searchContent">
                <tr>
                    <td>
                        分类名：<input type="text" name="cate_name" value="<?php echo $_input->post('cate_name');?>"/>
                    </td>
                    <td>
                        操作模块：<input type="text" name="action_url" value="<?php echo $_input->post('action_url');?>"/>
                    </td>
                </tr>
            </table>
            <div class="subBar">
                <ul>
                    <li><div class="buttonActive"><div class="buttonContent"><button type="submit">查询</button></div></div></li>
                </ul>
            </div>
        </div>
    </form>
</div>
<div class="pageContent">
    <div class="panelBar">
        <ul class="toolBar">
            <li><a class="add" href="<?php echo SITE_URL . 'index.php?c='.$controller.'&a=add';?>" target="dialog" height="350" width="650" rel="add_cate"><span>添加</span></a></li>
            <li class="line">line</li>
            <li><a class="delete" href="<?php echo SITE_URL . 'index.php?c='.$controller.'&a=del';?>&cate_id={sid}" target="ajaxTodo" title="确定要删除吗?"><span>删除</span></a></li>
            <li class="line">line</li>
            <li><a class="edit" href="<?php echo SITE_URL . 'index.php?c='.$controller.'&a=edit';?>&cate_id={sid}" target="dialog" mask="true" height="350" width="650"><span>修改</span></a></li>
        </ul>
    </div>
    <table class="table treeTable" width="100%" layoutH="138">
        <thead>
        <tr>
            <th width="30" align="center">ID</th>
            <th width="80" align="center">分类名称</th>
            <th width="80" align="center">操作模块</th>
            <th width="50" align="center">是否显示</th>
            <th width="50" align="center">左值</th>
            <th width="50" align="center">右值</th>
            <th width="50" align="center">父类ID</th>
            <th width="50" align="center">操作</th>
        </tr>
        </thead>
        <tbody>
        <?php foreach($list['rs'] as $v){?>
            <tr target="sid" rel="<?php echo $v['cate_id'];?>">
                <td><?php echo $v['cate_id'];?></td>
                <td><?php echo $v['cate_name'];?></td>
                <td><?php echo $v['action_url'];?></td>
                <td style="color:<?php echo $v['is_show'] ? 'green':'red';?>"><?php echo $v['is_show'] ? '是':'否';?></td>
                <td><?php echo $v['left_value'];?></td>
                <td><?php echo $v['right_value'];?></td>
                <td><?php echo $v['parent_cate_id'];?></td>
                <td>
                    <a href="<?php echo SITE_URL . 'index.php?c='.$controller.'&a=edit';?>&cate_id=<?php echo $v['cate_id'];?>" target="dialog" mask="true" height="400" rel="edit_cate">编辑</a> |
                    <a href="<?php echo SITE_URL . 'index.php?c='.$controller.'&a=del';?>&cate_id=<?php echo $v['cate_id'];?>" target="ajaxTodo" title="确定要删除吗?">删除</a>
                </td>
            </tr>
        <?php }?>
        </tbody>
    </table>
    <div class="panelBar">
        <div class="pages">
            <span>显示</span>
            <?php
            $_pager_num_type = array(30,50,100);
            ?>
            <select class="combox" name="numPerPage" change="navTabPageBreak" param="numPerPage">
                <?php
                foreach($_pager_num_type as $v){
                    echo '<option value="'.$v.'" '.($list['pager']->per_page == $v ? 'selected':'').'>'.$v.'</option>';
                }
                ?>
            </select>
            <span>条，共<?php echo $list['pager']->getTotalCount();?>条</span>
        </div>

        <div class="pagination" targetType="navTab" totalCount="<?php echo $list['pager']->getTotalCount();?>" numPerPage="<?php echo $list['pager']->per_page;?>" pageNumShown="5" currentPage="<?php echo $list['pager']->curr_page;?>"></div>

    </div>
</div>
<!--通用处理js-->
<script type="text/javascript" src="<?php echo SITE_URL . 'theme/js/v1/admin_common.js'; ?>"></script>
